Irregular-region based automatic image correction

ABSTRACT

Methods and apparatuses for irregular-region based automatic image correction are disclosed. In one aspect, the method is operable by an imaging device including a touch sensor, for performing image correction. The method can include obtaining a first image of a scene and receiving, via the touch sensor, a touch input indicating a selected region of the first image and having a shape that corresponds to a shape of the selected region. The method can also include determining statistics indicating visual properties for the selected region, adjusting at least one image correction parameter of the imaging device based on the determined statistics and the shape of the touch input, and obtaining a second image of the scene based on the adjusted at least one image correction parameter of the imaging device.

TECHNICAL FIELD

The present application relates generally to digital image processing,and more specifically, to methods and systems for improving digitalimage correction.

BACKGROUND

Imaging device, such as digital cameras, may perform automatic imagecorrection(s) on captured images in order to increase the quality of thecaptured images without significant user intervention. Automatic imagecorrection may involve, for example, 3A image correction functions(i.e., auto exposure, auto white balance, and auto focus). For example,3A image correction may be based on the entire captured image, theauto-detection of objects within the image, or the selection of a pointwithin the image by a user. Such approaches to image correction may beaffected by the manner in which a region-of-interest is selected for 3Aimage correction. In this context, there remains a need for furthercontrol over image correction based on improvements to the selection ofregions-of-interest.

SUMMARY

The systems, methods and devices of this disclosure each have severalinnovative aspects, no single one of which is solely responsible for thedesirable attributes disclosed herein.

In one aspect, there is provided a method, operable by an imaging deviceincluding a touch sensor, for performing image correction. The methodcan comprise obtaining a first image of a scene; receiving, via thetouch sensor, a touch input indicating a selected region of the firstimage and having a shape that corresponds to a shape of the selectedregion; determining statistics indicating visual properties for theselected region; adjusting at least one image correction parameter ofthe imaging device based on the determined statistics and the shape ofthe touch input; and obtaining a second image of the scene based on theadjusted at least one image correction parameter of the imaging device.

In another aspect, there is provided an imaging device, comprising animage sensor; a display; a touch sensor; at least one processor; and amemory storing computer-executable instructions for controlling the atleast one processor to: obtain a first image of a scene from the imagesensor; and control the display to display the first image; receive,from the touch sensor, a touch input indicating a selected region of thefirst image and having a shape that corresponds to a shape of theselected region; determine statistics indicating visual properties forthe selected region; adjust at least one image correction parameter ofthe imaging device based on the determined statistics and the shape ofthe touch input; and obtain a second image of the scene based on theadjusted at least one image correction parameter of the imaging device.

In yet another aspect, there is provided an apparatus comprising meansfor obtaining a first image of a scene; means for receiving a touchinput indicating a selected region of the first image and having a shapethat corresponds to a shape of the selected region; means fordetermining statistics indicating visual properties for the selectedregion; means for adjusting at least one image correction parameter ofan imaging device based on the determined statistics and the shape ofthe touch input; and means for obtaining a second image of the scenebased on the adjusted at least one image correction parameter of theimaging device.

In still another aspect, there is provided a non-transitory computerreadable storage medium having stored thereon instructions that, whenexecuted, cause a processor of a device to: obtain a first image of ascene; receive, via a touch sensor, a touch input indicating a selectedregion of the first image and having a shape that corresponds to a shapeof the selected region; determine statistics indicating visualproperties for the selected region; adjust at least one image correctionparameter of an imaging device based on the determined statistics andthe shape of the touch input; and obtain a second image of the scenebased on the adjusted at least one image correction parameter of theimaging device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A illustrates an example of an apparatus (e.g., a mobilecommunication device) that includes an imaging system that can recordimages of a scene in accordance with aspects of this disclosure.

FIG. 1B is a block diagram illustrating an example of an imaging devicein accordance with aspects of this disclosure.

FIG. 2 is an example of a first image captured by an imaging device inaccordance with aspects of this disclosure.

FIG. 3 is an example of a region selected by a user for image correctionin accordance with aspects of this disclosure.

FIG. 4 is another example of a region selected by a user for imagecorrection in accordance with aspects of this disclosure.

FIG. 5 is yet another example of a region selected by a user for imagecorrection in accordance with aspects of this disclosure.

FIG. 6 shows an example of a region including multiple objects selectedby a user in accordance with aspects of this disclosure.

FIG. 7 illustrates an example approach to determining statistics for aselected region of interest in accordance with aspects of thisdisclosure.

FIG. 8 is a flowchart illustrating an example method operable by animaging device in accordance with aspects of this disclosure.

FIG. 9 is a flowchart illustrating another example method operable by animaging device in accordance with aspects of this disclosure.

DETAILED DESCRIPTION

Digital camera systems or other imaging devices may perform variousautomatic processes to correct or adjust visual properties of a capturedimage. The image correction may include, for example, 3A imagecorrection functions (auto exposure, auto white balance, and autofocus). The digital camera may determine visual statistics related tothe current image correction function and use the determined statisticsas feedback in the determination of a corrective value to adjust imagecorrection parameters of the digital camera system. For example, in thecase of auto focus, the statistics may relate to a focus value of thecaptured image. The digital camera may then adjust a position of a lensof the camera, re-determine the focus value, and re-adjust the positionof the lens until an optical focus value has been obtained.

The auto focus algorithm may involve optimizing the focus value for theentire captured image. Since the focus of objects within the image maybe based on the respective distances of the objects from the lens of thecamera (also referred to as the depth of the objects), when objects arelocated at different distances they may not all be within focus for agiven lens position. Auto focus methods which optimize the focus valuefor the entire image may produce acceptable focus for scenes where themajority of objects are at similar depths (e.g., a principal focaldepth). However, a user of the camera may not be able to focus onobjects that are not at the principal focal depth using this auto focusmethod.

There are a number of variations of the auto focus algorithm which mayaddress the above limitations. In one such method, the auto focusalgorithm may place more emphasis on a center of the captured image.Thus, the user may be able to select a focus depth by positioning adesired object at the center of the image captured by the camera.However, this method does not enable the user to automatically focus theimage on objects that are not at the center of the image.

In another implementation, the camera may accept input from the userindicating a location of the image at which to perform auto focus. Theuser may select a location within the image and the camera may autofocusbased solely on or heavily weighted on a region corresponding to theuser's selected location. In one example, the user may input theselected location via touch input. This may enable the user to select anobject for auto focus that is not at the center of the image or at aprincipal focal depth of the image. However, this implementation mayhave the limitation that the user may only be able to select a singlelocation of fixed size and shape. Certain objects having irregularshapes or multiple objects cannot be selected for auto focus using thismethod.

In yet another implementation, the camera may accept multiple locationsfrom a user to find one or more optimal focus values based on theselected multiple locations. Accordingly, the user may select multipleregions on which the camera performs auto focus. In order for the camerato focus on each of the selected regions, the camera may be required tocapture multiple images at each of the focal depths corresponding to theselected regions or the camera may include redundant hardware componentsfor simultaneously capturing images at differing focal depths.

Each of the above-described auto focus implementations may be limited inthe ways in which the user may select locations of the image for autofocus. For instance, the user may only be able to select a fixed areaand fixed shape region that may be used by the camera in performing autofocus. Accordingly, such limited information prevents a processor of thecamera system from performing more advanced auto focus techniques thatmay more accurately focus on objects of interest to the user. It mayalso be difficult for the user to select an object which has a largersize than the defined size and shape of the selected locations. Forexample, when using a touch input sensor, it may be awkward for the userto select multiple locations which are close together in order to selecta larger object. Additionally, the combination of the selected locationsmay be larger than the object desired to be selected by the user, whichmay result in inaccurate auto focus processing.

Although the above has been discussed in connection with an auto focusimplementation of image correction, this disclosure may also be appliedto other auto image correction techniques, such as auto exposure andauto white balance. The statistics and feedback values determined by theprocessor may correspond to the specific auto image correction applied.For example, in auto exposure, the statistics determined by theprocessor may relate to the brightness, contrast, etc. of the capturedimage. The statistics may be used as feedback by the processor tocontrol at least one of an aperture size or a shutter speed of thecamera in order based on the statistics to perform the auto exposure.Similarly, in auto white balance the processor may determine the colortemperature of the image based on the selected location. The processormay alter the captured image based on the determined color temperatureto compensate for the lighting of the scene. Other image correctionalgorithms may also be performed within the scope of this disclosure.

The following detailed description is directed to certain specificembodiments. However, the described technology can be embodied in amultitude of different ways. It should be apparent that the aspectsherein may be embodied in a wide variety of forms and that any specificstructure, function, or both being disclosed herein is merelyrepresentative. Based on the teachings herein one skilled in the artshould appreciate that an aspect disclosed herein may be implementedindependently of any other aspects and that two or more of these aspectsmay be combined in various ways. For example, an apparatus may beimplemented or a method may be practiced using any number of the aspectsset forth herein. In addition, such an apparatus may be implemented orsuch a method may be practiced using other structure, functionality, orstructure and functionality in addition to or other than one or more ofthe aspects set forth herein.

Further, the systems and methods described herein may be implemented ona variety of different computing devices that host a camera. Theseinclude mobile phones, tablets, dedicated cameras, portable computers,photo booths or kiosks, personal digital assistants, ultra-mobilepersonal computers, and mobile internet devices. They may use generalpurpose or special purpose computing system environments orconfigurations. Examples of computing systems, environments, and/orconfigurations that may be suitable for use with the invention include,but are not limited to, personal computers (PCs), server computers,hand-held or laptop devices, multiprocessor systems,microprocessor-based systems, programmable consumer electronics, networkPCs, minicomputers, mainframe computers, distributed computingenvironments that include any of the above systems or devices, and thelike.

FIG. 1A illustrates an example of an apparatus (e.g., a mobilecommunication device) that includes an imaging system that can recordimages of a scene in accordance with aspects of this disclosure. Theapparatus 100 includes a display 120. The apparatus 100 may also includea camera on the reverse side of the apparatus, which is not shown. Thedisplay 120 may display images captured within the field of view 130 ofthe camera. FIG. 1A shows an object 150 (e.g., a person) within thefield of view 130 which may be captured by the camera. A processorwithin the apparatus 100 may perform automatic image correction of thecaptured image of the scene based on measured values associated with thecaptured image.

The apparatus 100 may perform various automatic processes to correctvisual properties of the image. In one aspect, the apparatus 100 mayperform auto image correction, including one or more of auto focus, autoexposure, and auto white balance, based on a region of the imageselected by the user. Aspects of this disclosure may relate totechniques which allow a user of the apparatus 100 to select irregularregions (e.g., regions having a shape and size determined by the user atthe time of selection) of the image to be used as feedback during theauto image correction.

FIG. 1B depicts a block diagram illustrating an example of an imagingdevice in accordance with aspects of this disclosure. The imaging device200, also referred herein to interchangeably as a camera, may include aprocessor 205 operatively connected to an image sensor 214, an optionaldepth sensor 216, a lens 210, an actuator 212, an aperture 218, ashutter 220, a memory 230, an optional storage 275, a display 280, aninput device 290, and an optional flash 295. In this example, theillustrated memory 230 may store instructions to configure processor 205to perform functions relating to the imaging device 200. In thisexample, the memory 230 may include instructions for instructing theprocessor 205 to perform image correction in accordance with aspects ofthis disclosure.

In an illustrative embodiment, light enters the lens 210 and is focusedon the image sensor 214. In some embodiments, the lens 210 is part of anauto focus lens system which can include multiple lenses and adjustableoptical elements. In one aspect, the image sensor 214 utilizes a chargecoupled device (CCD). In another aspect, the image sensor 214 utilizeseither a complementary metal-oxide semiconductor (CMOS) or CCD sensor.The lens 210 is coupled to the actuator 212 and may be moved by theactuator 212 relative to the image sensor 214. The actuator 212 isconfigured to move the lens 210 in a series of one or more lensmovements during an auto focus operation, for example, adjusting thelens position to change the focus of an image. When the lens 210 reachesa boundary of its movement range, the lens 210 or actuator 212 may bereferred to as saturated. In an illustrative embodiment, the actuator212 is an open-loop voice coil motor (VCM) actuator. However, the lens210 may be actuated by any method known in the art including aclosed-loop VCM, Micro-Electronic Mechanical System (MEMS), or a shapememory alloy (SMA).

In certain embodiments, the imaging device may include a plurality ofimage sensors 214. Each image sensor 214 may have a corresponding lens210 and/or aperture 218. In one embodiment, the plurality of imagesensors 214 may be the same type of image sensor (e.g., a Bayer sensor).In this implementation, the imaging device 200 may simultaneouslycapture a plurality of images via the plurality of image sensors 214,which may be focused at different focal depths. In other embodiments,the image sensors 214 may include different image sensor types thatproduce different information about the captured scene. For example, thedifferent image sensors 214 may be configured to capture differentwavelengths of light (infrared, ultraviolet, etc.) other than thevisible spectrum.

The depth sensor 216 is configured to estimate the depth of an object tobe captured in an image by the imaging device 200. The object may beselected by the user via the user inputting a region corresponding tothe object via the input device 290. The depth sensor 216 may beconfigured to perform a depth estimation using any technique applicableto determining or estimating depth of an object or scene with respect tothe imaging device 200, including auto focus techniques for estimatingdepth such as phase detection auto focus, time-of-flight auto focus,laser auto focus, or dual camera autofocus. The techniques may also beapplied using depth or location information received by the imagingdevice 200 from or about an object within a scene.

The display 280 is configured to display images captured via the lens210 and the image sensor 214 and may also be utilized to implementconfiguration functions of the imaging device 200. In oneimplementation, the display 280 can be configured to display one or moreregions of a captured image selected by a user, via an input device 290,of the imaging device 200. In some embodiments, the imaging device 200may not include the display 280.

The input device 290 may take on many forms depending on theimplementation. In some implementations, the input device 290 may beintegrated with the display 280 so as to form a touch screen display. Inother implementations, the input device 290 may include separate keys orbuttons on the imaging device 200. These keys or buttons may provideinput for navigation of a menu that is displayed on the display 280. Inother implementations, the input device 290 may be an input port. Forexample, the input device 290 may provide for operative coupling ofanother device to the imaging device 200. The imaging device 200 maythen receive input from an attached keyboard or mouse via the inputdevice 290. In still other embodiments, the input device 290 may beremote from and communicate with the imaging device 200 over acommunication network, e.g., a wireless network or a hardwired network.In yet other embodiments, the input device 290 may be a motion sensorwhich may receive input via tracking of the changing in position of theinput device in three dimensions (e.g., a motion sensor used as inputfor a virtual reality display). The input device 290 may allow the userto select a region of the image via the input of a continuous orsubstantially continuous line/curve that may form a curve (e.g., aline), a closed loop, or open loop.

The memory 230 may be utilized by the processor 205 to store datadynamically created during operation of the imaging device 200. In someinstances, the memory 230 may include a separate working memory in whichto store the dynamically created data. For example, instructions storedin the memory 230 may be stored in the working memory when executed bythe processor 205. The working memory may also store dynamic run timedata, such as stack or heap data utilized by programs executing onprocessor 205. The storage 275 may be utilized to store data created bythe imaging device 200. For example, images captured via image sensor214 may be stored on storage 275. Like the input device 290, the storage275 may also be located remotely, i.e., not integral with the imagingdevice 200, and may receive captured images via the communicationnetwork.

The memory 230 may be considered a computer readable medium and storesinstructions for instructing the processor 205 to perform variousfunctions in accordance with this disclosure. For example, in someaspects, memory 230 may be configured to store instructions that causethe processor 205 to perform method 400, method 500, or portion(s)thereof, as described below and as illustrated in FIGS. 8 and 9.

In one implementation, the instructions stored in the memory 230 mayinclude instructions for performing auto focus that configure theprocessor 205 to determine lens positions in a range of lens positionsof the lens 210 that may include a desired lens position for capturingan image. The determined lens positions may not include every possiblelens position within a range of lens positions, but may include only asubset of the possible lens positions within the range of lenspositions. The determined lens positions may be separated by a step sizeof one or more possible lens positions between determined lenspositions. For example, the determined lens positions can include afirst lens position at one end of the range of lens positions, the firstlens position representing a first focusing distance, and a second lensposition at the other end of the range of lens positions, the secondlens position representing a second focusing distance. The determinedlens positions may further include one or more intermediate lenspositions, each intermediate lens position representing a focusingdistance between the first and second focusing distances, where thedetermined lens positions are separated by a step size of one or morepossible lens positions between the determined lens positions in thefirst range of lens positions. In an illustrative embodiment, theprocessor 205 may determine lens positions in a range of lens positionsbased at least in part on an estimation of the depth of an object. Theinstructions may also configure the processor 205 to determine orgenerate focus values for images captured at one or more lens positionswithin the range of lens positions. The desired lens position forcapturing an image may be a lens position having a maximum focus value.The instructions may also configure the processor 205 to determine orgenerate a focus value curve or data representative of a focus valuecurve based on the determined or generated focus values. Theinstructions may also configure the processor 205 to determine lenspositions in a search range of lens positions based at least in part ongenerated focus values or a focus value curve or data representative ofa focus value curve based on a previous search range of lens positions.

Examples of various regions which may be selected by a user forperforming auto image correction in accordance with aspects of thisdisclosure will now be described in connection with FIGS. 2 to 7. FIG. 2is an example of a first image captured by an imaging device inaccordance with aspects of this disclosure. The image of FIG. 2 includesa central object 305 held by a man 310 shown on the right of the image.The central object 305 partially obstructs a woman 315 who is in thebackground of the image. Additionally, another woman's face 320 can beseen in the foreground on the left side of the image. In the followingdescription connected with FIGS. 2 to 7, the selection of a region by auser may be described in connection with an embodiment of the inputdevice 290 being a touch sensor. However, those skilled in the art willappreciate that the user may also select regions of an image via otherinput devices 290, for example, via a motion sensor, separate keys orbuttons, or via predetermined input received from a network connection(hardwired or wireless).

The image of FIG. 2 may be an image captured using an auto imagecorrection technique. For example, the device located at the center ofthe image may automatically be selected as a subject with respect towhich to perform auto image correction. In the case of auto focus, theprocessor 205 may determine the focal depth of the object 305 and adjustthe position of the lens based on the determined focal depth so as tofocus the captured image on the central object 305.

In accordance with one or more aspects of the present disclosure, FIG. 3is an example of a region selected by a user for image correction inaccordance with aspects of this disclosure. In the implementation ofFIG. 3, the user may select the man 310 shown on the right of the imagefor auto image correction. This may be accomplished by the user drawinga closed loop 325 around the man 310. Since the closed loop 325 does notinclude the central object 305, the processor 205 may perform auto imagecorrection based on excluding or reducing the effect of statisticsdetermined from the central object 305 and/or other regions of thecaptured image. Accordingly, the processor 205 may perform the autoimage correction based on the region including the man 310 on the rightof the image. In one example of auto focus, the processor 205 maydetermine a principal focal depth within the selected region of theclosed loop 325 or may determine a range of depths for the capture ofmultiple images within the full depth of focus of the closed loop 325.This will be described in greater detail below in connection with FIG.8.

FIG. 4 is another example of a region selected by a user for imagecorrection in accordance with aspects of this disclosure. As shown inFIG. 4, the user may select the woman 315 in the background as theregion for auto image correction. Since the central object 305 obstructsa significant portion of the woman 315 from view, it may be difficultfor the user to draw a closed loop around the woman 315 while excludingthe central object 305 from the selection. As such, in the selectedregion illustrated in FIG. 4, the user may draw a curve or a line 330overlapping the woman 315 in the background. Since the curve 330 doesnot overlap the central object 305, the user may be able to easilyselect the woman 315 without including the central object 305 in theselected region.

With reference to FIG. 5, there is shown a region selected by a user forimage correction in accordance with aspects of this disclosure. Theimage of FIG. 5 includes a number of stuffed animals located atdifferent focal depths. In the example of FIG. 5, the user may attemptto select a number of the stuffed animals via multi-touch input 335,340, 345, 350, and 355 (e.g., by placing five fingers respectively overthe desired stuffed animals). It may be difficult for the user toaccurately and simultaneously place five fingers over the stuffedanimals since they are located near each other within the image.

In accordance with one or more aspects of the present disclosure, FIG. 6shows an example of a region including multiple objects selected by auser. As shown in FIG. 6, the user may draw a closed loop 360 around thedesired stuffed animals. This may indicate a region to the processor 205with respect to which to perform auto image correction. The processor205 may be able to automatically detect, within the selected region,each of the five stuffed animals for more accurate image correction. Forexample, the processor 205 may perform facial recognition, within onlythe selected region, to identify the faces of the stuff animals.Depending on the content of the scene, the processor 205 may performother methods of automatically detecting objects within the selectedregion which can then be used in the determination of statisticsindicting visual properties of the objects as discussed below.

In related aspects, FIG. 7 illustrates an example approach todetermining statistics for a selected region of interest, wherein theselected region of interest has an open curved shape 370. As shown inFIG. 7, the processor 205 may divide the captured image into a pluralityor grid of blocks 365. The processor 205 may determine statistics foreach of the blocks 365. The statistics may depend on the type of autoimage correction being performed. For example, during auto focus, theprocessor 205 may determine a focus value as a statistic for each block365. The focus value may be a numerical representation of the overall oraverage focus for the block 365 (e.g., the distance that the block isfrom optimal focus). In an auto exposure example, the statistics may bea numerical representation of the overall or average brightness,luminance, or saturation of the block 365. In a white balance example,the statistics may be a numerical representation of the overall oraverage color temperature of the block 365.

The processor 205 may use the statistics as feedback in an auto imagecorrection method. In an example of auto focus, the processor 205 maydetermine a corrected lens position based on the focus values determinedfor each block 365. The corrected lens position may be used to determinean amount to move the lens to position the lens 210 in a corrected oroptimal lens position. In an example of auto exposure, the processor 205may determine a corrected aperture size or a corrected shutter speedbased on the determined numerical representation of the overall oraverage brightness, luminance, or saturation of the blocks 365.Similarly, in the auto white balance example, the processor 205 maydetermine a white balance compensation parameter or color compensationparameter(s) based on the determined numerical representation of theoverall or average color temperature of the blocks 365.

In one implementation, the processor 205 may weight the statistics forblocks 365 in the selected region higher than the statistics for theblocks 365 that are not in the selected region. This may allow the autoimage correction to emphasize the selected region when performing theauto image correction. In one implementation, the processor 205 mayweight the statistics for blocks 365 that are not in the selected regionto zero. In this implementation, the processor 205 may not be requiredto calculate the statistics for blocks 365 that are not in the selectedregion.

When the user touch input is a curve 370 as shown in FIG. 7, theprocessor 205 may weight the statistics corresponding the blocks 365that overlap the curve 370 higher than the statistics corresponding tothe remaining blocks 365 of the image. When the user touch input is aclosed loop 325 (see FIG. 3), the processor 205 may weight thestatistics corresponding the blocks 365 that are within the closed loop325 or correspond to an area defined by the closed loop 325 higher thanthe statistics corresponding to the remaining blocks 365 of the image.For example, the processor 205 may weight the statistics correspondingto the blocks that are within the closed loop 325 or correspond to anarea defined by the closed loop 325 by 0.8 (e.g., 80%) and weight thestatistics corresponding to the remaining blocks 365 by 0.2 (e.g., 20%).In some implementations, as discussed above in connection with FIG. 5,the processor 205 may automatically locate objects within the selectedregion. In these implementations, the processor 205 may weightstatistics for the blocks 365 corresponding to the detected objectshigher than the remainder of the selected region.

In one example, when the imaging device 200 has not received the usertouch input, the processor 205 may determine a final statistics valueaccording to equation 1:

$\begin{matrix}{{final\_ stats} = {\sum\limits_{i = 1}^{N}\;{{weight}_{i}*{stats}_{i}}}} & (1)\end{matrix}$

Where N is the total number of statistics regions (e.g., blocks) in theimage, stats_(i) are the statistics for the i^(th) region of the image,and weight_(i) is the weight assigned to the statistics of the i^(th)region.

When the imaging device 200 has received the user touch input, theprocessor 205 may determine a final statistics value by weighting thestatistics according to equation 2:

$\begin{matrix}{{final}_{stats} = {{\sum\limits_{i = 1}^{M}\;{{weight}_{i}*{stats}_{i}}} + {\sum\limits_{i = {M + 1}}^{N}{{weight}_{i}*{stats}_{i}}}}} & (2)\end{matrix}$

Where M is the total number of user-selected statistics regions, N isthe total number of statistics regions (e.g., blocks) in the image,stats_(i) are the statistics for the i^(th) region of the image, andweight_(i) is the weight assigned to the statistics of the i^(th)region. In equation 2, the value of M is less than the value of N.Further, the user selected statistics regions may be selected asdiscussed above (e.g., as the blocks that overlap the user touch inputor the blocks that are enclosed by the user touch input).

In another example, the final statistics from all user selected regionsmay be equally weighted. For example, the user selected regions may beweighted with a weight_(i) equal to 1/M. In this example, the regionsthat are not selected by the user may be given a weight of zero. This isshown by equation 3:

$\begin{matrix}{{final}_{stats} = {{\sum\limits_{i = 1}^{M}{\frac{1}{M}*{stats}_{i}}} + {\sum\limits_{i = {M + 1}}^{N}{0*{stats}_{i}}}}} & (3)\end{matrix}$

Although the above has been described in connection with a single imagesensor 214, aspects of this disclosure may also be adapted for use by animaging device 200 including a plurality of image sensors 214. Forexample, the imaging device 200 may include a plurality of the same typeof image sensors 214. In this example, when the imaging device 200receives the touch input from the user (e.g., the open curve, line, orclosed loop), the touch input may indicate a region of the imageincluding a plurality of focus depths. The processor 205 may determine aplurality of principal depths based on the region and the image sensors214 may respectively capture images of the scene at the determinedprincipal depths. In one implementation, this may be accomplished by theprocessor 205 determining weighted final statistics for each of theblocks in the selected region and determining a number of principaldepths of the selected region based on the weighted final statistics.The image sensors 214 may simultaneously capture an image at each of theprincipal depths.

In another example, the imaging device 200 may include a plurality ofimage sensors 214 that capture different types of information from ascene. The different image sensors 214 may be configured to captureadditional information of the selected region based on the spectrum(s)of light that may be captured by the image sensors 214. Oneimplementation of an imaging device 200 including the different imagesensors 214 may be a drone which may perform feature extraction andfocus on the region selected by the user. For example, the processor 205may determine weighted final statistics for each of the blocks in theselected region. The image sensors 214 may zoom in on the selectedregion and capture a new set of images. The processor 205 may determinemore detailed weighted final statistics for each of the blocks in theselected region based on the zoomed-in captured images. The drone mayreposition itself and the image sensors 214 for a better view of theselected region based on the detailed statistics and capture subsequentimages of the selected region.

Example Flowcharts for Irregular Region Auto Focus

An exemplary implementation of this disclosure will now be described inthe context of an auto focus procedure. It should be noted, however,that auto focus is merely described as an exemplary auto imagecorrection procedure, and the method 400 described in connection withFIG. 8 may be modified to be applicable to other auto image correctionprocedures, such as auto exposure and auto white balance.

FIG. 8 is a flowchart illustrating an example method operable by animaging device 200, or component(s) thereof, for auto focus inaccordance with aspects of this disclosure. For example, the steps ofmethod 400 illustrated in FIG. 8 may be performed by a processor 205 ofthe imaging device 200. For convenience, method 400 is described asperformed by the processor 205 of the imaging device 200.

The method 400 begins at block 401. At block 405, the processor 205captures a first image of a scene. At block 401, the processor 205displays the first image on a display 280 and prompts a user of theimaging device 200 to select a region of the first image on which toperform auto focus. At block 415, the processor 205 receives input fromthe user indicating a selected region of the first image. The processor205 may receive the input from the user via an input device 290, such asa touch sensor. At block 420, the processor 205 may determine acorrected lens position based on the selected region. In someimplementations, this may involve the processor 205 dividing the firstimage into a plurality of blocks, determining a focus value for each ofthe blocks, and/or determining a corrected lens position based onweighting the focus values for the blocks in the selected region greaterthan the blocks that are not in the selected region.

At block 425, the processor 205 adjusts the position of the lens to thecorrected position. At block 430, the processor 205 captures a secondimage of the scene at the corrected lens position. In someimplementations, this may include a feedback loop where the processor205 captures an intermediate image, re-determines the focus value, andif the focus value is not greater than a threshold focus value,re-determines the corrected lens position. Once the processor 205determines that the focus value for the intermediate image is greaterthan the threshold focus value, the processor 205 may determine that theselected region is at an optimal or acceptable focus level. The methodends at block 435.

In certain implementations, the selected region may comprise a pluralityof focal depths (e.g., the object(s) within the selected region may belocated at different depths from the imaging device 200). In this case,the processor 205 may capture a plurality of second images of the sceneat a plurality of intervals within the range of depths of the selectedregion. This may allow the user to select one of the images from theplurality of captured second images to be saved to memory 230.Alternatively, the processor 205 may perform post-processing on thesecond images to create a composite image where the entirety or majorityof the selected region is within focus.

FIG. 9 is a flowchart illustrating another example method operable by animaging device in accordance with aspects of this disclosure. The stepsillustrated in FIG. 9 may be performed by an imaging device 200 orcomponent(s) thereof. For example, the method 500 may be performed by aprocessor 205 of the imaging device 200. For convenience, the method 500is described as performed by the processor 205 of the imaging device.

The method 500 begins at block 501. At block 505, the processor 205obtains a first image of a scene. The processor 205 obtaining the firstimage may include receiving the first image from an image sensor 214 ofthe imaging device 200. The image sensor 214 may generate images of thescene based on light received via a lens 210. At block 510, theprocessor 205 receives, via a touch sensor (e.g., the input device 290),a touch input indicating a selected region of the first image and havinga shape corresponding to a shape of the selected region. The touch inputmay be input to the touch sensor by a user of the imaging device 200.The user touch input may be an open curve (such as a line) or a closedloop drawn by the user on the touch input.

At block 515, the processor 205 determines statistics indicating visualproperties for the selected region. The processor 205 may alsodetermines statistics indicating visual properties for the remainingregion of the first image. At block 520, the processor 205 adjusts animage correction parameter of the imaging device 200 based on thedetermined statistics and the shape of the touch input. At block 530,the processor obtains a second image of the scene based on the adjustedimage correction parameter of the imaging device 200. The processor 205obtaining the second image may include receiving the second image fromthe image sensor 214 of the imaging device 200 or generating the secondimage via image processing. The method ends at block 535.

Other Considerations

In some embodiments, the circuits, processes, and systems discussedabove may be utilized in a wireless communication device, such asapparatus 100. The wireless communication device may be a kind ofelectronic device used to wirelessly communicate with other electronicdevices. Examples of wireless communication devices include cellulartelephones, smart phones, Personal Digital Assistants (PDAs), e-readers,gaming systems, music players, netbooks, wireless modems, laptopcomputers, tablet devices, etc.

The wireless communication device may include one or more image sensors,two or more image signal processors, and a memory including instructionsor modules for carrying out the processes discussed above. The devicemay also have data, a processor loading instructions and/or data frommemory, one or more communication interfaces, one or more input devices,one or more output devices such as a display device and a powersource/interface. The wireless communication device may additionallyinclude a transmitter and a receiver. The transmitter and receiver maybe jointly referred to as a transceiver. The transceiver may be coupledto one or more antennas for transmitting and/or receiving wirelesssignals.

The wireless communication device may wirelessly connect to anotherelectronic device (e.g., base station). A wireless communication devicemay alternatively be referred to as a mobile device, a mobile station, asubscriber station, a user equipment (UE), a remote station, an accessterminal, a mobile terminal, a terminal, a user terminal, a subscriberunit, etc. Examples of wireless communication devices include laptop ordesktop computers, cellular phones, smart phones, wireless modems,e-readers, tablet devices, gaming systems, etc. Wireless communicationdevices may operate in accordance with one or more industry standardssuch as the 3rd Generation Partnership Project (3GPP). Thus, the generalterm “wireless communication device” may include wireless communicationdevices described with varying nomenclatures according to industrystandards (e.g., access terminal, user equipment (UE), remote terminal,etc.).

The functions described herein may be stored as one or more instructionson a processor-readable or computer-readable medium. The term“computer-readable medium” refers to any available medium that can beaccessed by a computer or processor. By way of example, and notlimitation, such a medium may include random-access memory (RAM),read-only memory (ROM), electrically erasable programmable read-onlymemory (EEPROM), flash memory or other optical disk storage, magneticdisk storage or other magnetic storage devices, or any other medium thatcan be used to store desired program code in the form of instructions ordata structures and that can be accessed by a computer. Disk and disc,as used herein, includes compact disc (CD), laser disc, optical disc,digital versatile disc (DVD), floppy disk and Blu-ray® disc where disksusually reproduce data magnetically, while discs reproduce dataoptically with lasers. It should be noted that a computer-readablemedium may be tangible and non-transitory. The term “computer-programproduct” refers to a computing device or processor in combination withcode or instructions (e.g., a “program”) that may be executed, processedor computed by the computing device or processor. As used herein, theterm “code” may refer to software, instructions, code or data thatis/are executable by a computing device or processor.

The methods disclosed herein include one or more steps or actions forachieving the described method. The method steps and/or actions may beinterchanged with one another without departing from the scope of theclaims. In other words, unless a specific order of steps or actions isrequired for proper operation of the method that is being described, theorder and/or use of specific steps and/or actions may be modifiedwithout departing from the scope of the claims.

It should be noted that the terms “couple,” “coupling,” “coupled” orother variations of the word couple as used herein may indicate eitheran indirect connection or a direct connection. For example, if a firstcomponent is “coupled” to a second component, the first component may beeither indirectly connected to the second component or directlyconnected to the second component. As used herein, the term “plurality”denotes two or more. For example, a plurality of components indicatestwo or more components.

The term “determining” encompasses a wide variety of actions and,therefore, “determining” can include calculating, computing, processing,deriving, investigating, looking up (e.g., looking up in a table, adatabase or another data structure), ascertaining and the like. Also,“determining” can include receiving (e.g., receiving information),accessing (e.g., accessing data in a memory) and the like. Also,“determining” can include resolving, selecting, choosing, establishingand the like.

The phrase “based on” does not mean “based only on,” unless expresslyspecified otherwise. In other words, the phrase “based on” describesboth “based only on” and “based at least on.”

In the foregoing description, specific details are given to provide athorough understanding of the examples. However, it will be understoodby one of ordinary skill in the art that the examples may be practicedwithout these specific details. For example, electricalcomponents/devices may be shown in block diagrams in order not toobscure the examples in unnecessary detail. In other instances, suchcomponents, other structures and techniques may be shown in detail tofurther explain the examples.

Headings are included herein for reference and to aid in locatingvarious sections. These headings are not intended to limit the scope ofthe concepts described with respect thereto. Such concepts may haveapplicability throughout the entire specification.

It is also noted that the examples may be described as a process, whichis depicted as a flowchart, a flow diagram, a finite state diagram, astructure diagram, or a block diagram. Although a flowchart may describethe operations as a sequential process, many of the operations can beperformed in parallel, or concurrently, and the process can be repeated.In addition, the order of the operations may be re-arranged. A processis terminated when its operations are completed. A process maycorrespond to a method, a function, a procedure, a subroutine, asubprogram, etc. When a process corresponds to a software function, itstermination corresponds to a return of the function to the callingfunction or the main function.

The previous description of the disclosed implementations is provided toenable any person skilled in the art to make or use the presentdisclosure. Various modifications to these implementations will bereadily apparent to those skilled in the art, and the generic principlesdefined herein may be applied to other implementations without departingfrom the spirit or scope of the disclosure. Thus, the present disclosureis not intended to be limited to the implementations shown herein but isto be accorded the widest scope consistent with the principles and novelfeatures disclosed herein.

What is claimed is:
 1. A method, operable by an imaging device includinga touch sensor, for performing image correction, the method comprising:obtaining a first image of a scene, the first image being divided into aplurality of blocks; receiving, via the touch sensor, a user-drawn inputindicating a selected region of the first image and having a shape thatcorresponds to a shape of the selected region; determining statisticsindicating visual properties for each of the blocks; determining thatthe shape of the user-drawn input comprises an open curve; weighting thestatistics for blocks of the first image that overlap the open curvehigher than blocks of the first image that do not overlap the opencurve; adjusting at least one image correction parameter of the imagingdevice based on the weighted statistics; and obtaining a second image ofthe scene based on the adjusted at least one image correction parameterof the imaging device.
 2. The method of claim 1, wherein the at leastone image correction parameter of the imaging device comprises one ormore of: a position of a lens, a size of an aperture, a shutter speed,and a white balance compensation parameter.
 3. The method of claim 1,wherein the method further comprises defining the selected region as anarea of the first image corresponding to the user-drawn input based onthe shape of the user-drawn input.
 4. The method of claim 1, furthercomprising: receiving, via the touch sensor, a second user-drawn inputindicating a second selected region of the first image and having ashape that corresponds to a shape of the second selected region;determining that the shape of the second user-drawn input comprises aclosed loop; and weighting the statistics for blocks of the grid thatare enclosed by the closed loop higher than blocks of the grid that arenot enclosed by the selected region.
 5. The method of claim 1, whereinthe at least one image correction parameter of the imaging devicecomprises a position of a lens, the method further comprising:determining a plurality of positions of the lens respectivelycorresponding to different focal depths of the selected region; andreceiving a third image at each of the determined positions of the lens.6. The method of claim 1, wherein the at least one image correctionparameter of the imaging device comprises a position of a lens, themethod further comprising: detecting at least one object within theselected region; determining the position of the lens corresponding to afocal depth of the object; and adjusting the position of the lens basedon the determined position of the lens.
 7. An imaging device,comprising: an image sensor; a display; a touch sensor; at least oneprocessor; and a memory storing computer-executable instructions forcontrolling the at least one processor to: obtain a first image of ascene from the image sensor, the first image being divided into aplurality of blocks; control the display to display the first image;receive, from the touch sensor, a user-drawn input indicating a selectedregion of the first image and having a shape that corresponds to a shapeof the selected region; determine statistics indicating visualproperties for each of the blocks; determine that the shape of theuser-drawn input comprises an open curve; weight the statistics forblocks of the first image that overlap the open curve higher than blocksof the first image that do not overlap the open curve; adjust at leastone image correction parameter of the imaging device based on theweighted statistics; and obtain a second image of the scene based on theadjusted at least one image correction parameter of the imaging device.8. The imaging device of claim 7, wherein the at least one imagecorrection parameter of the imaging device comprises one or more of: aposition of a lens, a size of an aperture, a shutter speed, and a whitebalance compensation parameter.
 9. The imaging device of claim 7,wherein the computer-executable instructions are further for controllingthe at least one processor to define the selected region as an area ofthe first image corresponding to the user-drawn input based on the shapeof the user-drawn input.
 10. The imaging device of claim 7, wherein thecomputer-executable instructions are further for controlling the atleast one processor to: receive, via the touch sensor, a seconduser-drawn input indicating a second selected region of the first imageand having a shape that corresponds to a shape of the second selectedregion; determine that the shape of the second user-drawn inputcomprises a closed loop; and weight the statistics for blocks of thegrid that are enclosed by the closed loop higher than blocks of the gridthat are not enclosed by the selected region.
 11. The imaging device ofclaim 7, wherein the at least one image correction parameter of theimaging device comprises a position of a lens, the computer-executableinstructions being further for controlling the at least one processorto: determine a plurality of positions of the lens respectivelycorresponding to different focal depths of the selected region; andreceive a third image at each of the determined positions of the lens.12. The imaging device of claim 7, wherein the at least one imagecorrection parameter of the imaging device comprises a position of alens, the computer-executable instructions being further for controllingthe at least one processor to: detect at least one object within theselected region; determine the position of the lens corresponding to afocal depth of the object; and adjust the position of the lens based onthe determined position of the lens.
 13. An apparatus, comprising: meansfor obtaining a first image of a scene, the first image being dividedinto a plurality of blocks; means for receiving a user-drawn inputindicating a selected region of the first image and having a shape thatcorresponds to a shape of the selected region; means for determiningstatistics indicating visual properties for each of the blocks; meansfor determining that the shape of the user-drawn input comprises an opencurve; means for weighting the statistics for blocks of the first imagethat overlap the open curve higher than blocks of the first image thatdo not overlap the open curve; means for adjusting at least one imagecorrection parameter of an imaging device based on the weightedstatistics; and means for obtaining a second image of the scene based onthe adjusted at least one image correction parameter of the imagingdevice.
 14. The apparatus of claim 13, wherein the at least one imagecorrection parameter of the imaging device comprises one or more of: aposition of a lens, a size of an aperture, a shutter speed, and a whitebalance compensation parameter.
 15. The apparatus of claim 13, whereinthe apparatus further comprises means for defining the selected regionas an area of the first image corresponding to the user-drawn inputbased on the shape of the user-drawn input.
 16. The apparatus of claim13, further comprising: means for receiving, via the touch sensor, asecond user-drawn input indicating a second selected region of the firstimage and having a shape that corresponds to a shape of the secondselected region; means for determining that the shape of the seconduser-drawn input comprises a closed loop; and means for weighting thestatistics for blocks of the grid that are enclosed by the closed loophigher than blocks of the grid that are not enclosed by the selectedregion.
 17. The apparatus of claim 13, wherein the at least one imagecorrection parameter of the imaging device comprises a position of alens, the apparatus further comprising: means for determining aplurality of positions of the lens respectively corresponding todifferent focal depths of the selected region; and means for receiving athird image at each of the determined positions of the lens.
 18. Theapparatus of claim 13, wherein the at least one image correctionparameter of the imaging device comprises a position of a lens, theapparatus further comprising: means for detecting at least one objectwithin the selected region; means for determining the position of thelens corresponding to a focal depth of the object; and means foradjusting the position of the lens based on the determined position ofthe lens.
 19. A non-transitory computer readable storage medium havingstored thereon instructions that, when executed, cause a processor of adevice to: obtain a first image of a scene, the first image beingdivided into a plurality of blocks; receive, via a touch sensor, auser-drawn input indicating a selected region of the first image andhaving a shape that corresponds to a shape of the selected region;determine statistics indicating visual properties for each of theblocks; determine that the shape of the user-drawn input comprises anopen curve; weight the statistics for blocks of the first image thatoverlap the open curve higher than blocks of the first image that do notoverlap the open curve; adjust at least one image correction parameterof an imaging device based on the weighted statistics; and obtain asecond image of the scene based on the adjusted at least one imagecorrection parameter of the imaging device.
 20. The non-transitorycomputer readable storage medium of claim 19, wherein the at least oneimage correction parameter of the imaging device comprises one or moreof: a position of a lens, a size of an aperture, a shutter speed, and awhite balance compensation parameter.
 21. The non-transitory computerreadable storage medium of claim 19, wherein the non-transitory computerreadable storage medium further has stored thereon instructions that,when executed, cause the processor to define the selected region as anarea of the first image corresponding to the user-drawn input based onthe shape of the user-drawn input.
 22. The non-transitory computerreadable storage medium of claim 19, further having stored thereoninstructions that, when executed, cause the processor to: receive, viathe touch sensor, a second user-drawn input indicating a second selectedregion of the first image and having a shape that corresponds to a shapeof the second selected region; determine that the shape of the seconduser-drawn input comprises a closed loop; and weight the statistics forblocks of the grid that are enclosed by the closed loop higher thanblocks of the grid that are not enclosed by the selected region.